package com.gaofans.nrpc.client.route.impl;

import com.gaofans.nrpc.client.route.Router;
import com.gaofans.nrpc.client.route.RouterPredicate;
import com.gaofans.nrpc.common.processor.ServiceAuthority;

import java.net.URI;

/**
 * @author GaoFans
 */
public class StaticRouter extends Router {

    public StaticRouter(int order, RouterPredicate predicate) {
        super(order, "StaticRouter", predicate);
    }

    @Override
    public ServiceAuthority find(URI uri) {
        return new ServiceAuthority(uri.getHost(),uri.getPort());
    }
}
